1. Technical Field
The present invention relates to a document processing of a structured document (XML) in an embedded apparatus, such as a printer or the like.
2. Related Art
As one of markup languages for describing meanings and structures of documents and data, XML (Extensible Markup Language) is known. In addition, there is known SVG (Scalable Vector Graphics) that is an XML-based language for describing 2D vector images and the like. The SVG is released as W3C (World Wide Web Consortium) recommendation. The SVG specifications include the SVG Print specification that defines processing rules in an environment, such as a printer, in which documents described with SVG are printed (Non-Patent Document 1).    [Non-Patent Document 1] SVG Print(http://www.w3.org/TR/SVGPrint/)
In the SVG Print document, a page element is used to define the range of a page in a print medium output from an apparatus, such a printer or the like. In addition, the content of the document (hereinafter, referred to as document fragment) can be structured so as to be shared with a plurality of pages. Accordingly, for example, a use element can be used to assign such that a document fragment of another page is referred to. During rendering, a document fragment of a reference destination is used as data of a page of a reference source and then processed.
A streamable attribute can be defined in an outermost SVG element in the SVG Print document. The streamable attribute is behind an element assigning a reference to indicate whether or not a document fragment (resource) to be referred to exists.
Specifically, when the streamable attribute value is true, it means that, even if an element assigning a reference exists, no document fragment to be referred exists behind the element. That is, even if an element assigning a reference appears, the reference can be resolved without referring to an element behind the corresponding element. Accordingly, it is not necessary to buffer the entire document in order to resolve the reference.
Meanwhile, when the streamable attribute value is false, it means that, according to an element assigning a reference, a document fragment to be referred to exists behind the corresponding element. That is, when an element assigning a reference appears, the reference may not be resolved. Accordingly, it is necessary to buffer the entire document in order to resolve the reference.
However, among the embedded apparatuses, such as printers and the like, for example, there may be an apparatus that has insufficient memory resources, memory space, or print processing performance. In such an apparatus, when a large volume of an SVG Print document, in which a streamable attribute value is set to false, is printed, buffering of the entire document becomes load, and the memory resources may be depleted or throughput may be markedly deteriorated. In addition, when such an apparatus cannot buffer the entire document, printing of the entire document may not be executed.
An advantage of some aspects of the invention is that it provides a technology capable of, in an apparatus, such as a printer or the like, which prints a SVG Print document, reducing the usage of memory resources of a print processing by switching print modes, improving throughput of the print processing according to the utilization of memory resources or the number of pages of the document, and even if the entire document cannot be buffered, allowing the print processing to be continued.